<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var name = '张三'
        function test (a,b) {
            alert(this.name+'_'+a +'_'+b)
        }
        var obj = {
            name: '李四'
        }

        //test.call(obj,1,2) // 改变this指向并执行这个函数
        //test.apply(obj,[3,4]) // 改变this指向并执行这个函数
        const func =  test.bind(obj)
        func()

        
    </script>
    
</body>
</html>